<template>
  <div>
    <el-container class="contenterdiv">
      <el-aside width="200px">
        <el-menu
          :router="routerblo"
          default-active="1"
          :default-openeds="arry"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#545c64"
          text-color="#fff"
          mode="vertical"
          active-text-color="#ffd04b"
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>首页配置</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/index/loopimg"> <i class="el-icon-picture"></i>轮播图</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group>
              <el-menu-item index="/index/hotgoods"> <i class="el-icon-star-on"></i>热销商品</el-menu-item>
            </el-menu-item-group>
            
          </el-submenu>

          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>模块管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/index/goodstype"> <i class="el-icon-picture"></i>分类管理</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group>
              <el-menu-item index="/index/goodslist"> <i class="el-icon-star-on"></i>商品列表</el-menu-item>
            </el-menu-item-group>
            
          </el-submenu>
         
   

          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>Dashboard</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/index/addgoods"> <i class="el-icon-picture"></i>添加商品</el-menu-item>
            </el-menu-item-group>
           
            
          </el-submenu>
         
        </el-menu>



        
      </el-aside>
      <el-container>
        <el-header class="rightheader">
            <div>{{ $route.meta.title }}</div>
            <div>右边</div>
        </el-header>
        <el-main>

           <router-view></router-view>
        </el-main>
        <el-footer>Copyright © 2019-2021 十三. All rights reserved.</el-footer>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data(){
    return {
      routerblo:true,
      arry:['1','2']
    }
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang="less">
.contenterdiv{
    height: 100vh;
    .el-aside{
      background-color: rgb(84, 92, 100);
    }
    .rightheader{
      display: flex;
      justify-content: space-between;
    }
}
</style>